'use strict'
/**
 * http.config
 * 你是一段成熟的代码，要学会自己改bug  ----我是小尾巴
 */

const baseUrl = '/'
const path = '/'

/**
 * http请求的配置
 * @type {{PREFIX: string, PACKAGE: string, BASE_URL: string}}
 */
const httpParams = {
  /**
   * 请求地址
   */
  BASE_URL: baseUrl,
  /**
   * 请求报名
   */
  PACKAGE: path,
  /**
   * http请求的前缀
   */
  PREFIX: `/${baseUrl}/${path}`,
  /**
   * 请求的头部信息
   */
  HEADER: {}
}

/**
 * 请求方式
 * @type {{DELETE: string, POST: string, GET: string, PUT: string}}
 */
const requestMethod = {
  GET: 'get',
  POST: 'post',
  PUT: 'put',
  DELETE: 'delete'
}

/**
 * 响应类型
 * @type {{BLOB: string, NULL: string, JSON: string, TEXT: string}}
 */
const responseType = {
  NULL: '',
  JSON: 'json',
  TEXT: 'text',
  BLOB: 'blob'
}

export {
  httpParams,
  requestMethod,
  responseType
}
